<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection"content="telephone=no, email=no" />
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="HandheldFriendly" content="true">
	<meta name="MobileOptimized" content="640">
	<meta name="screen-orientation" content="portrait">
	<meta name="x5-orientation" content="portrait">
	<meta name="full-screen" content="yes">
	<meta name="x5-fullscreen" content="true">
	<meta name="browsermode" content="application">
	<meta name="x5-page-mode" content="app">
	<meta name="msapplication-tap-highlight" content="no">
	<meta name="viewport" content="width=640,target-densitydpi=device-dpi,maximum-scale=1.0, user-scalable=no">
	<script>

    	var phoneWidth = parseInt(window.screen.width);
		var phoneScale = phoneWidth/640;
		var isAndroid = false;
		var ua = navigator.userAgent;
		if (/Android (\d+\.\d+)/.test(ua)){
			var version = parseFloat(RegExp.$1);
			// andriod 2.3
			if(version>2.3){
				document.write('<meta name="viewport" content="width=640, minimum-scale = '+phoneScale+', maximum-scale = '+phoneScale+', target-densitydpi=device-dpi">');
			// andriod 2.3以上
			}else{
				document.write('<meta name="viewport" content="width=640, target-densitydpi=device-dpi">');
			}
			isAndroid = true;
			// 其他系统
		} else {
			document.write('<meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi">');
		}

		function GetQueryString(name){
			var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
			var r = window.location.search.substr(1).match(reg);
			if(r!=null)return  unescape(r[2]); return null;
		}
   </script>
   	<link rel="stylesheet" type="text/css" href="css/index.css"/>
	<title>Generate</title>
</head>
<body>
	<div class="backgroud">
		<div class="input_one">
			<textarea name="" placeholder="输入文字..." maxlength="24" class='t1'></textarea>
		</div>
		<div class="input_two">
			<textarea name="" placeholder="输入文字..." maxlength="24" class='t2'></textarea>
		</div>
		<div class="input_three">
			<textarea name="" placeholder="输入文字..." maxlength="24" class='t3'></textarea>
		</div>
		<div class="input_four">
			<textarea name="" placeholder="输入文字..." maxlength="24" class='t4'></textarea>
		</div>
		<img src="img/generate_bottom.jpg" class="generate_bottom"/>
		<a href="javascript:;" class="btn button_generate"><img src="img/button_generate.png"/></a>
	</div>
</body>
		<script src="./js/jquery.min.js"></script>
	<script>
		$('.btn').click(function(){
			var _txt1 = $('.t1').val();
			var _txt2 = $('.t2').val();
			var _txt3 = $('.t3').val();
			var _txt4 = $('.t4').val();
			$.ajax({
				url:"../index.php?m=home&c=index&a=index",
				data:{'text1':_txt1,'text2':_txt2,'text3':_txt3,'text4':_txt4},
				type:'post',
				success:function(ret){
					if (ret.status){ //成功,输出图片路径
						//$('#mianimg').attr('src','.'+ret.path)
						window.location.href='./save.html?path='+decodeURIComponent(ret.path);
					
					}else{
						//失败
						alert(ret.info)
					}
				}
			})
		})
	</script>
</html>